<?php
// +----------------------------------------------------------------------
// | HisiPHP框架[基于ThinkPHP5开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2018 http://www.hisiphp.com
// +----------------------------------------------------------------------
// | HisiPHP承诺基础框架永久免费开源，您可用于学习和商用，但必须保留软件版权信息。
// +----------------------------------------------------------------------
// | Author: 橘子俊 <364666827@qq.com>，开发者QQ群：50304283
// +----------------------------------------------------------------------

namespace app\example\admin;
use app\admin\controller\Admin;
use app\example\model\CollectUser as userModel;
use think\Db;

/**
 * 用户
 * @package app\example\controller
 */
class User extends Admin
{
    public function index()
    {
        $_page = input('param.page/d', 0);
        $_keywords = input('param.keywords/s');
        $map = [];
        if ($_keywords) {
            $map['teltphone'] = ['like', '%'.$_keywords.'%'];
        }
        $data_list = Db::name('collect_user')->where($map)->paginate(10, false, ['query' => input('get.')]);
        $pages = $data_list->render();
        $this->assign("pages", $pages);
        $this->assign('data_list', $data_list);
        return $this->fetch();
    }
}